import Vue from "vue";
import Vuex from "vuex";
Vue.use(Vuex); // 应用Vuex插件

const actions = {};

const mutations = {
    SetRoutes(state, val) {
        state.routes = val;
    },
    SetUserInfo(state, val) {
        state.userInfo.type = val;
    },
};

const state = {
    routes: [],
    userInfo: {},
};

const getters = {};

export default new Vuex.Store({
    actions,
    mutations,
    state,
    getters
})